 <link rel="stylesheet" href="/css/publication/publication.css">
 <script type="text/javascript">
            $(function() {
                $( "a", ".btnResearchSelection" ).button();
                $("#newResearch").button();
            });
        </script>
 <script type="text/javascript" src="/js/publication/publication.js"></script>
 <div id="leftPanel">
     
     <div >
         <table width="100%">
             <tr>
                 <td class="tdPublicationHeader" width="60%" align="right">
                 <input id="hfUid" type="hidden" value="<?php echo isset ($userId)? $userId: ''; ?>"/>
                 <input id="hfTid" type="hidden" value="<?php echo $tabId; ?>"/>
                 <?php if($sf_user->isAuthenticated()): ?>
                    <input id="searchpublication" class="searchboxmain" type="text" placeholder="Search Datasets" onchange="return searchPublication_Changed(this.value, null, document.getElementById('hfSelectionStatus').value,(document.getElementById('hfSelectionStatus').value == <?php echo Types::$RESEARCH_TABS[Types::$RESEARCH_TABS_ALL]; ?>? 0 : <?php echo $sf_user->getAttribute('currentuser')->getId(); ?>) , 'hfSelectionStatus','hfPgNo', true);"/>
                 <?php else: ?>
                    <input id="searchpublication" class="searchboxmain" type="text" placeholder="Search Datasets" onchange="return searchPublication_Changed(this.value, null, <?php echo Types::$RESEARCH_TABS[Types::$RESEARCH_TABS_ALL] ?>, 0, 'hfSelectionStatus','hfPgNo', true);"/>
                 <?php endif; ?>
             </td>
             
             <?php if($sf_user->isAuthenticated()): ?>
             
             <td class="tdPublicationHeader" align="center">
                 <div class="btnResearchSelection">
                     <a href="<?php echo url_for('data/newResearch'); ?>">New Data Set</a>
                 </div>
             </td>

             <?php else: ?>
             <td width="5%">
             </td>
             <td class="tdPublicationHeader" align="center">
                 <div >
                     <a class="orangebutton" href="<?php echo url_for('/visualization'); ?>">Visualization</a>
                 </div>
             </td>
             <td class="tdPublicationHeader" align="center">
                <div>
                 <a class="greenbutton" href="<?php echo url_for('https://spreadsheets.google.com/spreadsheet/viewform?formkey=dEFNM2FxN1EyTG9NRFdXTXBFeHZRanc6MQ'); ?>">Feedback</a>
                </div>
             </td>

             <?php endif; ?>
             </tr>
         </table>

     </div>
     <table class="tbPublication" cellpadding="0" cellspacing="0" style="margin-top:20px;">
         <?php if($sf_user->isAuthenticated()): ?>
             <?php if( $showTabs ): ?>
                 <tr>
                     <td colspan="2" valign="bottom" style="border-bottom:1px solid silver">
                         <ul class="tabs">
                             <li>
                                 <a id="lnkAll" href="" onclick="return showMoreResearches(this, <?php echo Types::$RESEARCH_TABS[Types::$RESEARCH_TABS_ALL] ?>, 0, 'hfSelectionStatus', 'hfPgNo', true);"> Public Documents </a>
                             </li>
                             <li>
                                 <a id="lnkMine" class="activeTab" href="" onclick="return showMoreResearches(this, <?php echo Types::$RESEARCH_TABS[Types::$RESEARCH_TABS_MINE] ?>, <?php echo $sf_user->getAttribute('currentuser')->getId(); ?>, 'hfSelectionStatus', 'hfPgNo', true);"> <?php echo $sf_user->getAttribute('currentuser')->getFirstname().'\'s'; ?> </a>
                             </li>
                             <li>
                                 <a id="lnkCollaborationData" href="" onclick="return showMoreResearches(this, <?php echo Types::$RESEARCH_TABS[Types::$RESEARCH_TABS_COLLABORATION] ?>, <?php echo $sf_user->getAttribute('currentuser')->getId(); ?>, 'hfSelectionStatus', 'hfPgNo', true);"> Collaborating On </a>
                             </li>
                             <?php if($sf_user->getAttribute('currentuser')->getEntitytyperefid() == Types::$ENT_TYPE['PROFESSOR']): ?>
                             <li>
                                 <a id="lnkPendingPublicationList"  href="#" onclick="return showMoreResearches(this, <?php echo Types::$RESEARCH_TABS[Types::$RESEARCH_TABS_PENDING_APPROVAL] ?>, <?php echo $sf_user->getAttribute('currentuser')->getId(); ?>, 'hfSelectionStatus', 'hfPgNo', true);"> Approval Requests (<span class="redFont boldFont"><?php echo ResearchTable::getInstance()->getAllApprovalRequestsCountByStatus(Types::$RESEARCH_APPROVAL_STATUS[Types::$APPR_AWAITING], $sf_user->getAttribute('currentuser')->getId())->count(); ?></span>) </a>
                             </li>
                             <?php endif; ?>
                         </ul>
                     </td>
                 </tr>

             <?php elseif ($showUserTab == TRUE): ?>
                 <tr>
                     <td colspan="2" style="border-bottom: 1px solid silver; vertical-align: bottom;">
                         <ul class="tabs">
                             <li>
                                 <a id="lnkAllPublic" href="#"> <?php echo Entity::GetEntity($userId)->getFirstname().'\'s Document(s)'; ?> </a>
                             </li>
                         </ul>
                     </td>
                 </tr>
                 <tr>
                     <td colspan="2">
                         &nbsp;
                     </td>
                 </tr>
             <?php endif; ?>

         <?php endif ?>
         <tr>
             <td colspan="2">
                 <table  cellpadding="0" cellspacing="0" width="100%">
                     <tr>
                         <td id="tblRBISResearches" colspan="2">
                         </td>
                     </tr>
                 </table>
             </td>
         </tr>
     </table>
 </div>
 <input type="hidden" id="hfPgNo" value="1" />
 <input type="hidden" id="hfSelectionStatus" value="<?php echo Types::$RESEARCH_TABS[Types::$RESEARCH_TABS_MINE]; ?>" />


